using System;
using System.Collections.Generic;
using System.Text;
using CodePlex.Resourceful;

namespace CodePlex.Resourceful.Amazon.S3
{
    public static class S3Constants
    {
        public static readonly string Host = "s3.amazonaws.com";
        public static readonly string NamespaceURI = "http://s3.amazonaws.com/doc/2006-03-01/";
        public static readonly string XMLSchemaURI = "http://www.w3.org/2001/XMLSchema-instance";

        public static class Principals
        {
            public static readonly ACLPrincipal AllUsers = new ACLPrincipal("http://acs.amazonaws.com/groups/global/AllUsers", "AllUsers", true);
            public static readonly ACLPrincipal AuthenticatedUsers = new ACLPrincipal("http://acs.amazonaws.com/groups/global/AuthenticatedUsers", "AuthenticatedUsers", true);
            public static readonly ACLPrincipal LogDelivery = new ACLPrincipal("http://acs.amazonaws.com/groups/s3/LogDelivery", "LogDelivery", true);

            public static readonly ACLPrincipal EC2Tools = new ACLPrincipal("6aa5a366c34c1cbe25dc49211496e913e0351eb0e8c37aa3477e40942ec6b97c", "za-team", false);

            public static readonly IEnumerable<ACLPrincipal> All = new ACLPrincipal[]{
                AllUsers,
                AuthenticatedUsers,
                LogDelivery,
                EC2Tools
            };
        }


        public static class CannedAccessPolicies
        {
            public static readonly string Private = "private";
            public static readonly string AuthenticatedRead = "authenticated-read";
            public static readonly string PublicRead = "public-read";
            public static readonly string PublicReadWrite = "public-read-write";
            public static readonly string LogDeliveryWrite = "log-delivery-write";

            public static readonly IEnumerable<string> All = new string[]{
                Private,
                AuthenticatedRead,
                PublicRead,
                PublicReadWrite,
                LogDeliveryWrite
            };

        }

        public static class Permissions
        {
            public static readonly string Read = "READ";
            public static readonly string Write = "WRITE";
            public static readonly string ReadAcp = "READ_ACP";
            public static readonly string WriteAcp = "WRITE_ACP";
            public static readonly string FullControl = "FULL_CONTROL";
        }
       
        public static class Headers
        {
            public static readonly string AmazonPrefix = "x-amz-";
            public static readonly string AlternativeDateHeader = "x-amz-date";
            public static readonly string CannedAccessPolicy = "x-amz-acl";
            public static readonly string AmazonUserMetadataPrefix = "x-amz-meta-";
            public static readonly string AmazonRequestID = "x-amz-request-id";
            public static readonly string AmazonRequestID2 = "x-amz-id-2";
            public static readonly string AmazonMissingMetadata = "x-amz-missing-meta";

            public static readonly string ContentDisposition = "Content-Disposition";
            public static readonly string Server = "Server";
        }


        



    }
}
